<h:panelGrid xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:ap="http://aplikata.com/facelets" width="100%" cellpadding="5">
	<p:panel id="pnlRes">
		<h:panelGrid columns="2" width="100%" cellpadding="5">
			<h:outputLabel value="#{msgs.default_name_surname}" />
			<p:autoComplete completeMethod="#{evokPatientTherapyBean.completeQueryResName}"
				id="patientResName" size="40" value="#{evokPatientTherapyBean.qyResPatientName}"
				forceSelection="true" minQueryLength="3">

				<p:ajax event="itemSelect" listener="#{evokPatientTherapyBean.selectResPatientName}"
					update=":messages,:mainform:queryTabView:reservationList" />
			</p:autoComplete>

			<h:outputLabel value="#{msgs.patient_reservation_date}" />
			<p:calendar value="#{evokPatientTherapyBean.qyResDate}" showButtonPanel="true" showOn="button"
				navigator="true" pattern="dd/MM/yyyy" />
		</h:panelGrid>

		<f:facet name="footer">
			<h:panelGrid width="100%">
				<h:panelGroup style="float:right">
					<p:commandButton value="#{msgs.button_query}" icon="ui-icon-search" update="reservationList"
						autoSubmit="false" actionListener="#{evokPatientTherapyBean.queryReservation}" />
					<h:outputText value="&#160;&#160;" escape="false" />
					<p:commandButton value="#{msgs.button_reset}" icon="ui-icon-arrowrefresh-1-n"
						update="pnlRes,reservationList" style="autoSubmit:false;"
						actionListener="#{evokPatientTherapyBean.resetResQuery}" />
				</h:panelGroup>
			</h:panelGrid>
		</f:facet>
	</p:panel>

	<p:dataTable var="lo" value="#{evokPatientTherapyBean.doctorScheduleDataModel}"
		id="reservationList" selectionMode="single" rowKey="#{lo.id}" widgetVar="wdgResList">
		<p:ajax event="rowSelect" listener="#{evokPatientTherapyBean.selectPatientReservation}"
			update=":mainform:pnlinfo" />

		<p:column headerText="#{msgs.default_from}">
			<h:outputText value="#{lo.timeFrom}">
				<f:convertDateTime pattern="HH:mm" />
			</h:outputText>
		</p:column>
		<p:column headerText="#{msgs.default_to}">
			<h:outputText value="#{lo.timeTo}">
				<f:convertDateTime pattern="HH:mm" />
			</h:outputText>
		</p:column>
		<p:column headerText="#{msgs.default_name_surname}">
			<h:outputText value="#{lo.patient.surname} #{lo.patient.name}" />
		</p:column>
	</p:dataTable>
</h:panelGrid>
